﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;

namespace HFController
{
    /// <summary>
    /// 文书业务逻辑
    /// </summary>
    public class InstrumentsController:ControllerBase
    {
        //单列
        private static InstrumentsController _instrumentsController;
        //实例化单列模式
        public static InstrumentsController getController()
        {
            if (_instrumentsController == null)
            {
                _instrumentsController = new InstrumentsController();
            }
            return _instrumentsController;
        }
        #region 文书大分类

        /// <summary>
        /// 文书大分类数据库访问
        /// </summary>
        hf.DAL.InstrumentsBigClass InstrumentsBigClassDAL = new hf.DAL.InstrumentsBigClass();

        /// <summary>
        /// 添加文书大分类
        /// </summary>
        /// <param name="InstrumentsName"></param>
        public void doAddInstrumentsBigClass(string InstrumentsName)
        {
            HFModel.ResultModel result = new HFModel.ResultModel();
            hf.Model.InstrumentsBigClass model = new hf.Model.InstrumentsBigClass();

            model.InstrumentsName = InstrumentsName;
            try
            {
                model.ID = InstrumentsBigClassDAL.Add(model);

                result.isTrue = true;
                result.Message = "添加成功！";
                result.goUrl = "location='InstrumentsBigClass.aspx';";
                result.historyUrl = "history.go(-1)";
            }
            catch
            {
                result.isTrue = false;
                result.Message = "系统问题，清联系管理员";
                result.goUrl = "history.go(-1)";
                result.historyUrl = "history.go(-1)";
            }
            this.doResult(result);
        }

        /// <summary>
        /// 根据一个ID 得到一条文书大分类
        /// </summary>
        /// <param name="ID"></param>
        /// <returns></returns>
        public hf.Model.InstrumentsBigClass getInstrumentsBigClassModel(int ID)
        {
            hf.Model.InstrumentsBigClass model = new hf.Model.InstrumentsBigClass();
            int total;

            List<hf.Model.InstrumentsBigClass> list = InstrumentsBigClassDAL.GetInstrumentsBigClassList(1, 1, "ID=" + ID.ToString(), out total);
            if (list.Count > 0)
            {
                model = list[0];
            }
            else
            {
                model = null;
            }
            return model;
        }

        /// <summary>
        /// 修改文书大分类
        /// </summary>
        /// <param name="ID"></param>
        /// <param name="InstrumentsName"></param>
        public void doModifyInstrumentsBigClass(int ID, string InstrumentsName)
        {
            HFModel.ResultModel result = new HFModel.ResultModel();
            hf.Model.InstrumentsBigClass model = this.getInstrumentsBigClassModel(ID);

            model.InstrumentsName = InstrumentsName;

            try
            {
                //执行修改
                InstrumentsBigClassDAL.Update(model);

                result.isTrue = true;
                result.Message = "修改成功！";
                result.goUrl = "location='InstrumentsBigClass.aspx';";
                result.historyUrl = "history.go(-1)";
            }
            catch
            {
                result.isTrue = false;
                result.Message = "系统问题，清联系管理员";
                result.goUrl = "history.go(-1)";
                result.historyUrl = "history.go(-1)";
            }
            this.doResult(result);
        }

        /// <summary>
        /// 得到大类列表，绑定下拉框
        /// </summary>
        /// <param name="LoadCount"></param>
        /// <returns></returns>
        public List<hf.Model.InstrumentsBigClass> getInstrumentsBigClassList(int LoadCount)
        {
            List<hf.Model.InstrumentsBigClass> list = new List<hf.Model.InstrumentsBigClass>();
            //总数据记录
            int total;

            //筛选条件
            string strSql = "";

            //获得列表
            list = InstrumentsBigClassDAL.GetInstrumentsBigClassList(LoadCount, 1, strSql, out total);

            return list;
        }

        /// <summary>
        /// 得到广文书大类列表
        /// </summary>
        /// <param name="PagerStr"></param>
        /// <returns></returns>
        public List<hf.Model.InstrumentsBigClass> getInstrumentsBigClassList(out string PagerStr)
        {
            List<hf.Model.InstrumentsBigClass> list = new List<hf.Model.InstrumentsBigClass>();

            //没有显示记录
            int PageSize = 10;
            //当前页码
            int PageNumber = 1;
            if (HttpContext.Current.Request.QueryString["Page"] != null)
            {
                PageNumber = int.Parse(HttpContext.Current.Request.QueryString["Page"].ToString());
            }
            //记录总条数
            int total;
            //筛选条件
            string strSql = "";

            //获得列表
            list = InstrumentsBigClassDAL.GetInstrumentsBigClassList(PageSize, PageNumber, strSql, out total);

            //分页
            PagerStr = LLL.Pager.TrunPageHtmlCode(PageSize, PageNumber, total, "");

            return list;
        }

        /// <summary>
        /// 删除文书大分类
        /// </summary>
        /// <param name="ID"></param>
        public void doDelegeInstrumentsBigClass(int ID)
        {
            HFModel.ResultModel result = new HFModel.ResultModel();
            try
            {
                InstrumentsBigClassDAL.Delete(ID);

                result.isTrue = true;
                result.Message = "删除成功！";
                result.goUrl = "location='InstrumentsBigClass.aspx';";
                result.historyUrl = "history.go(-1)";
            }
            catch
            {
                result.isTrue = false;
                result.Message = "系统问题，清联系管理员";
                result.goUrl = "history.go(-1)";
                result.historyUrl = "history.go(-1)";
            }
            this.doResult(result);
        } 
        #endregion

        #region 文书小分类

        /// <summary>
        /// 文书小类数据库访问
        /// </summary>
        private hf.DAL.InstrumentsSmallClass InstrumentsSmallClassDAL = new hf.DAL.InstrumentsSmallClass();

        /// <summary>
        /// 添加文书小分类
        /// </summary>
        /// <param name="InstrumentsID"></param>
        /// <param name="InstrumentsName"></param>
        public void doAddInstrumentsSmallClass(string InstrumentsName,string InstrumentsID)
        {
            HFModel.ResultModel result = new HFModel.ResultModel();
            hf.Model.InstrumentsSmallClass model = new hf.Model.InstrumentsSmallClass();

            model.InstrumentsID = int.Parse(InstrumentsID);
            model.InstrumentsName = InstrumentsName;
            try
            {
                model.ID = InstrumentsSmallClassDAL.Add(model);

                result.isTrue = true;
                result.Message = "添加成功！";
                result.goUrl = "location='InstrumentsSmallClass.aspx';";
                result.historyUrl = "history.go(-1)";
            }
            catch
            {
                result.isTrue = false;
                result.Message = "系统问题，清联系管理员";
                result.goUrl = "history.go(-1)";
                result.historyUrl = "history.go(-1)";
            }
            this.doResult(result);
        }

        /// <summary>
        /// 根据一个ID 得到一条文书小分类
        /// </summary>
        /// <param name="ID"></param>
        /// <returns></returns>
        public hf.Model.InstrumentsSmallClass getInstrumentsSmallClassModel(int ID)
        {
            hf.Model.InstrumentsSmallClass model = new hf.Model.InstrumentsSmallClass();
            int total;

            List<hf.Model.InstrumentsSmallClass> list = InstrumentsSmallClassDAL.GetInstrumentsSmallClassList(1, 1, "ID=" + ID.ToString(), out total);
            if (list.Count > 0)
            {
                model = list[0];
            }
            else
            {
                model = null;
            }
            return model;
        }

        /// <summary>
        /// 得到文书小类列表，用作绑定下拉框
        /// </summary>
        /// <param name="LoadCount">读取记录数</param>
        /// <returns></returns>
        public List<hf.Model.InstrumentsSmallClass> getInstrumentsSmallClassList(int LoadCount)
        {
            List<hf.Model.InstrumentsSmallClass> list = new List<hf.Model.InstrumentsSmallClass>();
            //总数据记录
            int total;

            //筛选条件
            string strSql = "";

            //获得列表
            list = InstrumentsSmallClassDAL.GetInstrumentsSmallClassList(LoadCount, 1, strSql, out total);

            return list;
        }

        /// <summary>
        /// 得到文书小类列表，用作绑定下拉框
        /// </summary>
        /// <param name="InstrumentsID"></param>
        /// <param name="LoadCount"></param>
        /// <returns></returns>
        public List<hf.Model.InstrumentsSmallClass> getInstrumentsSmallClassList(int InstrumentsID, int LoadCount)
        {
            List<hf.Model.InstrumentsSmallClass> list = new List<hf.Model.InstrumentsSmallClass>();
            //总数据记录
            int total;

            //筛选条件
            string strSql = "InstrumentsID = " + InstrumentsID.ToString();

            //获得列表
            list = InstrumentsSmallClassDAL.GetInstrumentsSmallClassList(LoadCount, 1, strSql, out total);

            return list;
        }

        /// <summary>
        /// 修改文书小分类
        /// </summary>
        /// <param name="ID"></param>
        /// <param name="InstrumentsID"></param>
        /// <param name="InstrumentsName"></param>
        public void doModifyInstrumentsSmallClass(int ID,string InstrumentsName,string InstrumentsID)
        {
            HFModel.ResultModel result = new HFModel.ResultModel();
            hf.Model.InstrumentsSmallClass model = this.getInstrumentsSmallClassModel(ID);

            model.InstrumentsID = int.Parse(InstrumentsID);
            model.InstrumentsName = InstrumentsName;

            try
            {
                //执行修改
                InstrumentsSmallClassDAL.Update(model);

                result.isTrue = true;
                result.Message = "修改成功！";
                result.goUrl = "location='InstrumentsSmallClass.aspx';";
                result.historyUrl = "history.go(-1)";
            }
            catch
            {
                result.isTrue = false;
                result.Message = "系统问题，清联系管理员";
                result.goUrl = "history.go(-1)";
                result.historyUrl = "history.go(-1)";
            }
            this.doResult(result);
        }

        /// <summary>
        /// 得到类型列表，绑定下拉框
        /// </summary>
        /// <param name="LoadCount"></param>
        /// <returns></returns>
        public List<hf.Model.InstrumentsFileType> getInstrumentsFileTypeList(int LoadCount)
        {
            List<hf.Model.InstrumentsFileType> list = new List<hf.Model.InstrumentsFileType>();
            //总数据记录
            int total;

            //筛选条件
            string strSql = "";

            //获得列表
            list = InstrumentsFileTypeDAL.GetInstrumentsFileTypeList(LoadCount, 1, strSql, out total);

            return list;
        }

        /// <summary>
        /// 得到文书小分类列表
        /// </summary>
        /// <param name="PagerStr"></param>
        /// <returns></returns>
        public List<hf.Model.InstrumentsSmallClass> getInstrumentsSmallClassList(out string PagerStr)
        {
            List<hf.Model.InstrumentsSmallClass> list = new List<hf.Model.InstrumentsSmallClass>();

            //没有显示记录
            int PageSize = 10;
            //当前页码
            int PageNumber = 1;
            if (HttpContext.Current.Request.QueryString["Page"] != null)
            {
                PageNumber = int.Parse(HttpContext.Current.Request.QueryString["Page"].ToString());
            }
            //记录总条数
            int total;
            //筛选条件
            string strSql = "";

            //获得列表
            list = InstrumentsSmallClassDAL.GetInstrumentsSmallClassList(PageSize, PageNumber, strSql, out total);

            //分页
            PagerStr = LLL.Pager.TrunPageHtmlCode(PageSize, PageNumber, total, "");

            return list;
        }

        /// <summary>
        /// 删除文书小分类
        /// </summary>
        /// <param name="ID"></param>
        public void doDelegeInstrumentsSmallClass(int ID)
        {
            HFModel.ResultModel result = new HFModel.ResultModel();

            try
            {
                InstrumentsSmallClassDAL.Delete(ID);

                result.isTrue = true;
                result.Message = "删除成功！";
                result.goUrl = "location='InstrumentsSmallClass.aspx';";
                result.historyUrl = "history.go(-1)";
            }
            catch
            {
                result.isTrue = false;
                result.Message = "系统问题，清联系管理员";
                result.goUrl = "history.go(-1)";
                result.historyUrl = "history.go(-1)";
            }
            this.doResult(result);
        }
        #endregion

        #region 文书文件类型

        /// <summary>
        /// 文书文件类型数据库访问
        /// </summary>
        private hf.DAL.InstrumentsFileType InstrumentsFileTypeDAL = new hf.DAL.InstrumentsFileType();

        /// <summary>
        /// 添加文书文件类型
        /// </summary>
        /// <param name="TypeName"></param>
        public void doAddInstrumentsFileType(string TypeName)
        {
            HFModel.ResultModel result = new HFModel.ResultModel();
            hf.Model.InstrumentsFileType model = new hf.Model.InstrumentsFileType();

            model.TypeName = TypeName;
            try
            {
                model.ID = InstrumentsFileTypeDAL.Add(model);

                result.isTrue = true;
                result.Message = "添加成功！";
                result.goUrl = "location='InstrumentsFileType.aspx';";
                result.historyUrl = "history.go(-1)";
            }
            catch
            {
                result.isTrue = false;
                result.Message = "系统问题，清联系管理员";
                result.goUrl = "history.go(-1)";
                result.historyUrl = "history.go(-1)";
            }
            this.doResult(result);
        }

        /// <summary>
        /// 根据一个ID 得到一条文书文件类型
        /// </summary>
        /// <param name="ID"></param>
        /// <returns></returns>
        public hf.Model.InstrumentsFileType getInstrumentsFileTypeModel(int ID)
        {
            hf.Model.InstrumentsFileType model = new hf.Model.InstrumentsFileType();
            int total;

            List<hf.Model.InstrumentsFileType> list = InstrumentsFileTypeDAL.GetInstrumentsFileTypeList(1, 1, "ID=" + ID.ToString(), out total);
            if (list.Count > 0)
            {
                model = list[0];
            }
            else
            {
                model = null;
            }
            return model;
        }

        ///// <summary>
        ///// 得到文书类型列表，用作绑定下拉框
        ///// </summary>
        ///// <param name="LoadCount">读取记录数</param>
        ///// <returns></returns>
        //public List<hf.Model.InstrumentsFileType> getInstrumentsFileTypeList(int LoadCount)
        //{
        //    List<hf.Model.InstrumentsFileType> list = new List<hf.Model.InstrumentsFileType>();
        //    //总数据记录
        //    int total;

        //    //筛选条件
        //    string strSql = "";

        //    //获得列表
        //    list = InstrumentsFileTypeDAL.GetInstrumentsFileTypeList(LoadCount, 1, strSql, out total);

        //    return list;
        //}

        /// <summary>
        /// 修改文书文件类型
        /// </summary>
        /// <param name="ID"></param>
        /// <param name="TypeName"></param>
        public void doModifyInstrumentsFileType(int ID, string TypeName)
        {
            HFModel.ResultModel result = new HFModel.ResultModel();
            hf.Model.InstrumentsFileType model = this.getInstrumentsFileTypeModel(ID);

            model.TypeName = TypeName;
            try
            {
                //执行修改
                InstrumentsFileTypeDAL.Update(model);

                result.isTrue = true;
                result.Message = "修改成功！";
                result.goUrl = "location='InstrumentsFileType.aspx';";
                result.historyUrl = "history.go(-1)";
            }
            catch
            {
                result.isTrue = false;
                result.Message = "系统问题，清联系管理员";
                result.goUrl = "history.go(-1)";
                result.historyUrl = "history.go(-1)";
            }
            this.doResult(result);
        }

        /// <summary>
        /// 得到文书文件类型列表
        /// </summary>
        /// <param name="PagerStr"></param>
        /// <returns></returns>
        public List<hf.Model.InstrumentsFileType> getInstrumentsFileTypeList(out string PagerStr)
        {
            List<hf.Model.InstrumentsFileType> list = new List<hf.Model.InstrumentsFileType>();

            //没有显示记录
            int PageSize = 10;
            //当前页码
            int PageNumber = 1;
            if (HttpContext.Current.Request.QueryString["Page"] != null)
            {
                PageNumber = int.Parse(HttpContext.Current.Request.QueryString["Page"].ToString());
            }
            //记录总条数
            int total;
            //筛选条件
            string strSql = "";

            //获得列表
            list = InstrumentsFileTypeDAL.GetInstrumentsFileTypeList(PageSize, PageNumber, strSql, out total);

            //分页
            PagerStr = LLL.Pager.TrunPageHtmlCode(PageSize, PageNumber, total, "");

            return list;
        }

        /// <summary>
        /// 删除文件文书类型
        /// </summary>
        /// <param name="ID"></param>
        public void doDelegeInstrumentsFileType(int ID)
        {
            HFModel.ResultModel result = new HFModel.ResultModel();
            try
            {
                InstrumentsFileTypeDAL.Delete(ID);

                result.isTrue = true;
                result.Message = "删除成功！";
                result.goUrl = "location='InstrumentsFileType.aspx';";
                result.historyUrl = "history.go(-1)";
            }
            catch
            {
                result.isTrue = false;
                result.Message = "系统问题，清联系管理员";
                result.goUrl = "history.go(-1)";
                result.historyUrl = "history.go(-1)";
            }
            this.doResult(result);
        }
        #endregion

        #region 文书

        /// <summary>
        /// 文书数据库访问
        /// </summary>
        private hf.DAL.Instruments InstrumentsDAL = new hf.DAL.Instruments();

        /// <summary>
        /// 添加文书
        /// </summary>
        /// <param name="ClassID"></param>
        /// <param name="SmallClassID"></param>
        /// <param name="TypeID"></param>
        /// <param name="Title"></param>
        /// <param name="Content"></param>
        /// <param name="Addtime"></param>
        public void doAddInstruments(string ClassID, string SmallClassID, string TypeID, string Title, string Content, DateTime Addtime, int CityID)
        {
            HFModel.ResultModel result = new HFModel.ResultModel();
            hf.Model.Instruments model = new hf.Model.Instruments();

            model.ClassID = int.Parse(ClassID);
            model.SmallClassID = int.Parse(SmallClassID);
            model.TypeID = int.Parse(TypeID);
            model.Title = Title;
            model.Content = Content;
            model.Addtime = Addtime;
            model.CityID = CityID;

            try
            {
                model.ID = InstrumentsDAL.Add(model);

                result.isTrue = true;
                result.Message = "添加成功！";
                result.goUrl = "location='Instruments.aspx';";
                result.historyUrl = "history.go(-1)";
            }
            catch
            {
                result.isTrue = false;
                result.Message = "系统问题，清联系管理员";
                result.goUrl = "history.go(-1)";
                result.historyUrl = "history.go(-1)";
            }
            this.doResult(result);
        }

        /// <summary>
        /// 根据ID 得到一条文书
        /// </summary>
        /// <param name="ID"></param>
        /// <returns></returns>
        public hf.Model.Instruments getInstrumentsModel(int ID)
        {
            hf.Model.Instruments model = new hf.Model.Instruments();

            int total;
            List<hf.Model.Instruments> list = InstrumentsDAL.GetInstrumentsList(1, 1, "ID=" + ID.ToString(), out total);
            if (list.Count > 0)
            {
                model = list[0];
            }
            else
            {
                model = null;
            }
            return model;
        }

        /// <summary>
        /// 修改文书
        /// </summary>
        /// <param name="ID"></param>
        /// <param name="ClassID"></param>
        /// <param name="SmallClassID"></param>
        /// <param name="TypeID"></param>
        /// <param name="Title"></param>
        /// <param name="Content"></param>
        /// <param name="Addtime"></param>
        public void doModifyInstruments(int ID, string ClassID, string SmallClassID, string TypeID, string Title, string Content, DateTime Addtime,int CityID)
        {
            HFModel.ResultModel result = new HFModel.ResultModel();
            hf.Model.Instruments model = this.getInstrumentsModel(ID);

            model.ClassID = int.Parse(ClassID);
            model.SmallClassID = int.Parse(SmallClassID);
            model.TypeID = int.Parse(TypeID);
            model.Title = Title;
            model.Content = Content;
            model.Addtime = Addtime;
            model.CityID = CityID;
            try
            {
                //执行修改
                InstrumentsDAL.Update(model);

                result.isTrue = true;
                result.Message = "修改成功！";
                result.goUrl = "location='InstrumentsList.aspx';";
                result.historyUrl = "history.go(-1)";
            }
            catch
            {
                result.isTrue = false;
                result.Message = "系统问题，清联系管理员";
                result.goUrl = "history.go(-1)";
                result.historyUrl = "history.go(-1)";
            }
            this.doResult(result);
        }

        /// <summary>
        /// 搜索用的列表
        /// </summary>
        /// <param name="PageSize"></param>
        /// <param name="PageNumber"></param>
        /// <param name="strWhere"></param>
        /// <param name="total"></param>
        /// <returns></returns>
        public List<hf.Model.Instruments> getInstrumentsList(int PageSize ,int PageNumber ,string strWhere ,out int total)
        {
            List<hf.Model.Instruments> list = new List<hf.Model.Instruments>();
            //获得列表
            list = InstrumentsDAL.GetInstrumentsList(PageSize, PageNumber, strWhere, out total);
            this.BindParameter(list);
            return list;
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="strWhere"></param>
        /// <returns></returns>
        public int getInstrumentsContent(string strWhere)
        {
            int total = 0;
            List<hf.Model.Instruments> list = new List<hf.Model.Instruments>();
            //获得列表
            list = InstrumentsDAL.GetInstrumentsList(1, 1, strWhere, out total);
            return total;
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="Count"></param>
        /// <returns></returns>
        public List<hf.Model.Instruments> getInstrumentsList(int Count)
        {
            List<hf.Model.Instruments> list = new List<hf.Model.Instruments>();

            //每页显示的记录
            int PageSize = Count;

            //总数据记录
            int total;

            //筛选条件
            string strSql = "";

            //获得列表
            list = InstrumentsDAL.GetInstrumentsList(PageSize, 1, strSql, out total);
            this.BindParameter(list);
            return list;
        }

        /// <summary>
        /// 绑定参数
        /// </summary>
        /// <param name="list"></param>
        private void BindParameter(List<hf.Model.Instruments> list)
        {
            foreach (hf.Model.Instruments i in list)
            {
                if (i.SmallClassID != 0)
                {
                    i.SmallClassName = InstrumentsController.getController().getInstrumentsSmallClassModel(i.SmallClassID).InstrumentsName;
                }
                else {
                    if (i.TypeID != 0)
                    {
                        i.SmallClassName = InstrumentsController.getController().getInstrumentsFileTypeModel(i.TypeID).TypeName;
                    }
                    else
                    {
                        i.SmallClassName = "";
                    }
                }
            }
        }

        /// <summary>
        /// 得到得到文书列表
        /// </summary>
        /// <param name="PagerStr"></param>
        /// <returns></returns>
        public List<hf.Model.Instruments> getInstrumentsList(out string PagerStr)
        {
            List<hf.Model.Instruments> list = new List<hf.Model.Instruments>();

            //每页显示的记录
            int PageSize = 10;
            //当前页码
            int PageNumber = 1;
            if (HttpContext.Current.Request.QueryString["Page"] != null)
            {
                PageNumber = int.Parse(HttpContext.Current.Request.QueryString["Page"].ToString());
            }

            //总数据记录
            int total;

            //筛选条件
            string strSql = "";

            //获得列表
            list = InstrumentsDAL.GetInstrumentsList(PageSize, PageNumber, strSql, out total);

            //分页
            PagerStr = LLL.Pager.TrunPageHtmlCode(PageSize, PageNumber, total, "");

            return list;
        }

        /// <summary>
        /// 删除文书
        /// </summary>
        /// <param name="ID"></param>
        public void doDelegeInstruments(int ID)
        {
            HFModel.ResultModel result = new HFModel.ResultModel();

            try
            {
                InstrumentsDAL.Delete(ID);

                result.isTrue = true;
                result.Message = "删除成功！";
                result.goUrl = "location='InstrumentsList.aspx';";
                result.historyUrl = "history.go(-1)";
            }
            catch
            {
                result.isTrue = false;
                result.Message = "系统问题，清联系管理员";
                result.goUrl = "history.go(-1)";
                result.historyUrl = "history.go(-1)";
            }
            this.doResult(result);
        }

        /// <summary>
        /// 批量删除
        /// </summary>
        /// <param name="IDS"></param>
        public void doDelegeInstruments(string[] IDS)
        {
            HFModel.ResultModel result = new HFModel.ResultModel();
            try
            {
                for (int i = 0; i < IDS.Length; i++)
                {
                    InstrumentsDAL.Delete(int.Parse(IDS[i].Trim()));
                }
                result.isTrue = true;
                result.Message = "删除成功！";
                result.goUrl = "location='InstrumentsList.aspx';";
                result.historyUrl = "history.go(-1)";
            }
            catch
            {
                result.isTrue = false;
                result.Message = "系统问题，清联系管理员";
                result.goUrl = "history.go(-1)";
                result.historyUrl = "history.go(-1)";
            }
            this.doResult(result);
        }
        #endregion
    }
}
